function RealTimeAnimator(){
	var layer = realTimeLayer;
	var startMsec = 0;
	var endMsec = 100;
	var features = [];
	var speed = 20000;
	var frameRate = 5;
	this.setStartAndEndMsec = function(s,e){
		startMsec = s;
		endMsec = e;
		return this;
	};
	this.start = function(startTime){
		layer.removeAllFeatures();
		layer.setVisibility(true);
		startMsec = startTime?startTime:startMsec;
		layer.animator.setSpeed(speed);
		layer.animator.setFrameRate(frameRate);
		layer.animator.setStartTime(startMsec);
		layer.animator.setEndTime(endMsec);
		layer.addFeatures(features);
		layer.animator.start();
		return this;
	};
	this.pause = function(){
		layer.animator.pause();
		return this;
	};
	this.stop = function(){
		layer.animator.stop();
		return this;
	};
	this.setSpeed = function(i){
	//	setSpeed();//每次播放多少时间
	//	setFrameRate();//每秒播放多少次
		if(i>0){
			frameRate *= i;
		}
		return this;
	};
	this.setData = function(data){
		//id,lon,lat,startTime,endTime,data
		addFeature(data);
		return this;
	};
	this.setDatas = function(datas){
		for(var i in datas){
			addFeature(datas[i]);
		}
		return this;
	};
	function addFeature(data){
		var feature =  new SuperMap.Feature.Vector(
				new SuperMap.Geometry.Point(data.lon,data.lat),//设置第一个位置
				{
					FEATUREID:data.id,//设置为点的id
					TIME:data.startTime//设置第一个时间
				},{//style
					fillColor: "orange",
					pointRadius:5
				}
		);
		var feature2 =  new SuperMap.Feature.Vector(
				new SuperMap.Geometry.Point(data.lon,data.lat),//设置第一个位置
				{
					FEATUREID:data.id,//设置为点的id
					TIME:data.endTime//设置第一个时间
				},{//style
					fillColor: "orange",
					pointRadius:5
				}
		);
		var feature3 =  new SuperMap.Feature.Vector(
				new SuperMap.Geometry.Point(data.lon,data.lat),//设置第一个位置
				{
					FEATUREID:data.id,//设置为点的id
					TIME:data.endTime+1//设置第一个时间
				},{//style
					fillColor: "orange",
					pointRadius:0
				}
		);
		features.push(feature);
		features.push(feature2);
		features.push(feature3);
	}
}